// const path = require('path')
// const CopyWebpackPlugin = require('copy-webpack-plugin')

// module.exports = {
// 	transpileDependencies: ['uview-ui'],
// 	plugins: [
// 		new CopyWebpackPlugin([{
// 			from: path.join(__dirname, 'cloudfunctions'),
// 			to: path.join(__dirname, 'buji-shimbon/unpackage/dist', process.env.NODE_ENV === 'development' ? 'dev' :
// 				'build', process.env.UNI_PLATFORM, 'cloudfunctions')
// 		}])
// 	]
// }

const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = {
	transpileDependencies: ['uview-ui'],
	configureWebpack: {
		plugins: [
			new CopyWebpackPlugin([{
				from: path.join(__dirname, 'static/cloudfunctions'),
				to: path.join(__dirname, 'buji-shimbon/unpackage/dist', process.env.NODE_ENV ===
					'development' ?
					'dev' : 'build', process.env.UNI_PLATFORM, 'cloudfunctions')
			}])
		]
	},
}
